package com.biglead.admin.service;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.biglead.admin.pojo.UmsMenu;
import com.biglead.admin.pojo.UmsResource;
import com.biglead.admin.pojo.UmsRole;

import java.util.List;

/**
 * 后台角色管理Service
 * Created by macro on 2018/9/30.
 */
public interface UmsRoleService extends IService<UmsRole> {
    /**
     * 根据管理员ID获取对应菜单
     */
    List<UmsMenu> getMenuList(Long adminId);

    boolean create(UmsRole role);

    boolean updateRole(Long id, UmsRole role);

    boolean delete(List<Long> ids);

    Page<UmsRole> pageList(String keyword, Integer pageSize, Integer pageNum);

    List<UmsMenu> listMenu(Long roleId);

    List<UmsResource> listResource(Long roleId);

    int allocMenu(Long roleId, List<Long> menuIds);

    int allocResource(Long roleId, List<Long> resourceIds);
}
